package logic

import (
	"context"
	user "enjoy-joy/common/proto"
	"enjoy-joy/service/server"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s ServerUser) SendSms(ctx context.Context, in *user.SendSmsReq) (*user.SendSmsResp, error) {
	sms, err := server.SendSms(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
func (s ServerUser) UserLoginOrRegister(ctx context.Context, in *user.UserLoginOrRegisterReq) (*user.UserLoginOrRegisterResp, error) {
	register, err := server.UserLoginOrRegister(in)
	if err != nil {
		return nil, err
	}
	return register, nil
}
func (s ServerUser) ClassList(ctx context.Context, in *user.ClassListReq) (*user.ClassListResp, error) {
	list, err := server.ClassList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
